{{template "Public/header.html" .}}
<link rel="stylesheet" type="text/css" href="/public/css/calendar/jscal2.css"/>
<link rel="stylesheet" type="text/css" href="/public/css/calendar/border-radius.css"/>
<link rel="stylesheet" type="text/css" href="/public/css/calendar/calendar-blue.css"/>
<link href="/public/css/calendar/win2k.css" type="text/css" />
<link href="/public/css/kindeditor/themes/default/default.css" type="text/css" />
<link href="/public/css/kindeditor/plugins/code/prettify.css" type="text/css" />
<script language="javascript" src="/public/js/calendar/calendar.js"></script>
<script language="javascript" src="/public/js/calendar/lang/en.js"></script>
<script language="javascript" src="/public/js/lib/jquery.cookie.js"></script>
<script language="javascript" src="/public/js/lib/colorpicker.js"></script>
<script language="javascript" src="/public/js/kindeditor/kindeditor.js"></script>
<script language="javascript" src="/public/js/kindeditor/kindeditor.js"></script>
<script language="javascript" src="/public/js/kindeditor/lang/zh_CN.js"></script>
<script language="javascript" src="/public/js/kindeditor/plugins/code/prettify.js"></script>
<script language="javascript" src="/public/js/Module/announce.js"></script>
<script>
$(document).ready(function() {
	//日期选择控件
	Calendar.setup({
		weekNumbers : true,
		inputField : "starttime",
		trigger : "starttime",
		dateFormat : "%Y-%m-%d %H:%M:%S",
		showTime : true,
		minuteStep : 1,
		onSelect : function() {
			this.hide();
		}
	});

	Calendar.setup({
		weekNumbers : true,
		inputField : "endtime",
		trigger : "endtime",
		dateFormat : "%Y-%m-%d %H:%M:%S",
		showTime : true,
		minuteStep : 1,
		onSelect : function() {
			this.hide();
		}
	});

	KindEditor.ready(function(K) {
		var editor1 = K.create('textarea[name="content"]', {
			uploadJson : '/Kindeditor/upload/',
			fileManagerJson : '/Kindeditor/manager/',
			allowFileManager : true,
			afterCreate : function() {
				var self = this;
				K.ctrl(document, 13, function() {
					self.sync();
					K('form[name=myform]')[0].submit();
				});
				K.ctrl(self.edit.doc, 13, function() {
					self.sync();
					K('form[name=myform]')[0].submit();
				});
			}
		});
		prettyPrint();
	});
})	
</script>
<body>
	<div class="subnav">
		<div class="content-menu ib-a blue line-x">
			<a href='/Announce/'><em>公告列表</em></a><span>|</span><a
				href='javascript:;' class="on"><em>编辑公告</em></a>
		</div>
	</div>
	<div class="pad_10">
		{{if .announce_info}}
			{{with .announce_info}}
			<form method="post" action="/Announce/edit/" onsubmit="return form_submit()" name="myform" id="myform">
				<input type="hidden" id="id" name="id" value="{{.Id}}"></input>
				<table class="table_form" width="100%" cellspacing="0">
					<tbody>
						<tr>
							<th width="80"><strong>公告标题：</strong></th>
							<td>
								<input name="title" id="title" class="input-text"
								value="{{.Title}}" type="text" size="50">
							</td>
						</tr>
						<tr>
							<th><strong>起始日期：</strong></th>
							<td><input type="text" name="starttime" id="starttime"
								value="{{.Starttime}}"
								size="21" class="date" readonly>&nbsp;</td>
						</tr>
						<tr>
							<th><strong>截止日期：</strong></th>
							<td><input type="text" name="endtime" id="endtime"
								value="{{.Endtime}}" size="21"
								class="date" readonly>&nbsp;</td>
						</tr>
						<tr>
							<th><strong>公告内容：</strong></th>
							<td>
								<textarea name="content"
								style="width: 670px; height: 270px; visibility: hidden;"
								id="content">{{.Content}}	
								</textarea></td>
						</tr>
						<tr>
							<th><strong>公告状态：</strong></th>
							<td>
								<input type="radio" name="status" {{if eq .Status 1}}checked{{end}} value="1"> &nbsp;通过&nbsp;&nbsp;
								<input type="radio" name="status" {{if eq .Status 0}}checked{{end}} value="0"> &nbsp;待审核
							</td>
						</tr>
					</tbody>
				</table>
				<div class="bk15"></div>
				<input name="dosubmit" type="submit" value="提交" class="button">
			</form>
			{{end}}
		{{end}}
	</div>
</body>

{{template "Public/footer.html" .}}